package com.coolingme.course;

import com.coolingme.course.courseinterface.INote;
import com.coolingme.course.courseinterface.IVideo;

/**
 * 课程抽象，持有笔记和视频
 *
 * @author wangyue
 * @date 2020-09-20 17:28
 */
public abstract class AbstractCourse {

    protected INote note;

    protected IVideo video;

    public AbstractCourse(INote note, IVideo video) {
        this.note = note;
        this.video = video;
    }

    /**
     * 课程额外的功能
     */
    public void show() {
        note.read();
        video.watch();
    }

}
